<!DOCTYPE html>
<html>
  <head>
    <title>配置快递鸟</title>
	<include file='public/head'>
	<style>
		.layui-legend-size{font-size:14px !important;}
		.layui-nopadding{padding:0 !important;}
		.layui-overflow{overflow:auto;}
		.layui-nomargin{margin: 0 !important;}
		.layui-bottom{border-bottom:1px solid rgb(226, 226, 226);}
		.layui-input{height:30px !important; }
		.layui-form-search-item .layui-inline{margin-bottom: 5px;} 
		.layui-form-search-item label{margin-left: 15px;}
		.layui-table-page {padding: 7px 0px 0px;}
		.layui-field-padding{border-width: 1px;padding:0 0 5px 10px;}
	</style>
</head>
<body>

<div class="layui-tab">
<form class="layui-form" id="f" method="post" >

  <label class="layui-form-label" style="font-size:20px">接口配置</label>
  <table class="layui-table layui-nomargin" style="text-align: center;margin-top:20px">
    <tr>
      <td>申请网址</td>
      <td>
        <div style="width:30%;">
          <a href="http://www.kdniao.com/UserCenter/v2/UserHome.aspx" target="_blank" rel="noopener noreferrer" style="color:red;">快递鸟</a>
        </div>
      </td>
    </tr>
    <tr>
      <td>电商ID</td>
      <td>
        <input type="text" name="edit[EBusinessID]"  class="layui-input" required="" value="{$EXinfo.EBusinessID}">
      </td>
    </tr>
    <tr>
      <td>电商私钥</td>
      <td>
        <input type="text" name="edit[AppKey]"  class="layui-input" required="" value="{$EXinfo.AppKey}">
      </td>
    </tr>
    <tr>
      <td>本地打印机名称</td>
      <td>
        <input type="text" name="edit[printName]" class="layui-input" required="" placeholder="打印机一,打印机二(如有多个以“,”隔开)" value="{$EXinfo.printName}">
      </td>
    </tr>
    <tr>
      <td>邮费支付方式</td>
      <td>
          <input type="radio" name="edit[PayType]" value="1" title="现付" <eq name="$EXinfo.PayType" value="1">checked=""</eq>>
          <input type="radio" name="edit[PayType]" value="2" title="到付" <eq name="$EXinfo.PayType" value="2">checked=""</eq>>
          <input type="radio" name="edit[PayType]" value="3" title="月结" <eq name="$EXinfo.PayType" value="3">checked=""</eq>>
      </td>
    </tr>
    <!-- <tr>
      <td>默认快递公司</td>
      <td>
        <div class="layui-input-inline" style="width: 150px;">
          <select name="edit[code]" class="layui-input" lay-verify="" lay-search="">
              <if condition="$EXinfo.code eq null"> 
                <option value="" >请选择</option></if>
              
              <option value="YZBK" <if condition="$EXinfo.code eq 'YZBK'"> selected='selected'</if>>邮政国内标快</option> 
              <option value="YZPY" <if condition="$EXinfo.code eq 'YZPY'"> selected='selected'</if>>邮政快递包裹</option> 
              <option value="LHT" <if condition="$EXinfo.code eq 'LHT'"> selected='selected'</if>>联昊通速递</option> 
              <option value="EST365" <if condition="$EXinfo.code eq 'EST365'"> selected='selected'</if>>东方汇</option> 
              <option value="SF" <if condition="$EXinfo.code eq 'SF'"> selected='selected'</if>>顺丰速运</option> 
              <option value="ZJS" <if condition="$EXinfo.code eq 'ZJS'"> selected='selected'</if>>宅急送</option> 
              <option value="EMS" <if condition="$EXinfo.code eq 'EMS'"> selected='selected'</if>>EMS</option> 
              <option value="ZTO" <if condition="$EXinfo.code eq 'ZTO'"> selected='selected'</if>>中通快递</option> 
              <option value="YD" <if condition="$EXinfo.code eq 'YD'"> selected='selected'</if>>韵达速递</option> 
              <option value="HTKY" <if condition="$EXinfo.code eq 'HTKY'"> selected='selected'</if>>百世快递</option> 
              <option value="YTO" <if condition="$EXinfo.code eq 'YTO'"> selected='selected'</if>>圆通速递</option> 
              <option value="YCWL" <if condition="$EXinfo.code eq 'YCWL'"> selected='selected'</if>>远成快运</option> 
              <option value="UC" <if condition="$EXinfo.code eq 'UC'"> selected='selected'</if>>优速快递</option> 
              <option value="ANE" <if condition="$EXinfo.code eq 'ANE'"> selected='selected'</if>>安能快递</option> 
              <option value="UAPEX" <if condition="$EXinfo.code eq 'UAPEX'"> selected='selected'</if>>全一快递</option> 
              <option value="STO" <if condition="$EXinfo.code eq 'STO'"> selected='selected'</if>>申通快递</option> 
              <option value="DBL" <if condition="$EXinfo.code eq 'DBL'"> selected='selected'</if>>德邦快递</option> 
              <option value="JD" <if condition="$EXinfo.code eq 'JD'"> selected='selected'</if>>京东快递</option> 
              <option value="XFEX" <if condition="$EXinfo.code eq 'XFEX'"> selected='selected'</if>>信丰物流</option> 
              <option value="HHTT"<if condition="$EXinfo.code eq 'HHTT'"> selected='selected'</if>>天天快递</option> 
              <option value="SURE"<if condition="$EXinfo.code eq 'SURE'"> selected='selected'</if>>速尔快递</option> 
              <option value="KYSY"<if condition="$EXinfo.code eq 'KYSY'"> selected='selected'</if>>跨越速运</option> 
              <option value="PJ" <if condition="$EXinfo.code eq 'PJ'"> selected='selected'</if>>品骏快递</option> 
              <option value="CND" <if condition="$EXinfo.code eq 'CND'"> selected='selected'</if>>承诺达</option> 
              <option value="JTSD">极兔速递</option> 
              <option value="DNWL" <if condition="$EXinfo.code eq 'DNWL'"> selected='selected'</if>>丹鸟物流</option> 
              <option value="SNWL" <if condition="$EXinfo.code eq 'SNWL'"> selected='selected'</if>>苏宁物流</option> 
              
          </select>
      </div>
      </td>
    </tr> -->
  </table>


  <br/>
  <br/>
  <label class="layui-form" style="font-size:20px">快递鸟（快递公司）网点后台电子面单客户号配置</label>
  <table class="layui-table layui-nomargin" style="text-align: center;margin-top:20px">
    <tr>
      <td>快递公司名称</td>
      <td style="width:20%;">是否需线下联系当地网点申请电子面单客户号</td>
      <td colspan = " 3 ">快递鸟（快递公司）电子面单客户号参数配置</td>
    </tr>

    <tr>
      <td>邮政国内标快(YZBK)</td>
      <td>否</td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>邮政快递包裹(YZPY)</td>
      <td>否</td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>联昊通速递(LHT)</td>
      <td>否</td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>东方汇(EST365)</td>
      <td>否</td>
      <td></td>
      <td></td>
    </tr>

    <tr>
      <td>顺丰速运(SF)</td>
      <td>否</td>
      <td>
        <input type="text" name="config[SF][MonthCode]"  class="layui-input" required="" placeholder="月结号(选填)" value="{$config['SF']['MonthCode'] | default='' }">
      </td>
      <td></td>
    </tr>
    <tr>
      <td>宅急送(ZJS)</td>
      <td>否</td>
      <td>
        <input type="text" name="config[ZJS][CustomerName]"  class="layui-input" required="" placeholder="分仓标识(选填)" value="{$config['ZJS']['CustomerName'] | default='' }">
      </td>
      <td></td>
    </tr>
    <tr>
      <td>EMS(EMS)</td>
      <td>广东省内发件不需要</td>
      <td>
        <input type="text"" name="config[EMS][CustomerName]"  class="layui-input" required="" placeholder="大客户号" value="{$config['EMS']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[EMS][EBusinessID]"  class="layui-input" required="" placeholder="APP_SECRET"  value="{$config['EMS']['EBusinessID'] | default='' }">
      </td>
    </tr>
    <tr>
        <td>中通快递(ZTO)</td>
        <td>是(可通过快递鸟后台申请)</td>
        <td>
          <input type="text" name="config[ZTO][CustomerName]"  class="layui-input" required="" placeholder="商家ID" value="{$config['ZTO']['CustomerName'] | default='' }">
        </td>
        <td>
          <input type="text" name="config[ZTO][CustomerPwd]"  class="layui-input" required="" placeholder="商家接口密码(选填)" value="{$config['ZTO']['CustomerPwd'] | default='' }">
        </td>
    </tr>
    <tr>
      <td>韵达速递(YD)</td>
      <td>是(可通过快递鸟后台申请)</td>
      <td>
        <input type="text" name="config[YD][CustomerName]"  class="layui-input" required="" placeholder="客户ID" value="{$config['YD']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[YD][CustomerPwd]"  class="layui-input" required="" placeholder="接口联调密码" value="{$config['YD']['CustomerPwd'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>百世快递(HTKY)</td>
      <td>是(可通过快递鸟后台申请)</td>
      <td>
        <input type="text" name="config[HTKY][CustomerName]"  class="layui-input" required="" placeholder="操作编码" value="{$config['HTKY']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[HTKY][CustomerPwd]"  class="layui-input" required="" placeholder="ERP秘钥" value="{$config['HTKY']['CustomerPwd'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>圆通速递(YTO)</td>
      <td>是(可通过快递鸟后台申请)</td>
      <td>
        <input type="text" name="config[YTO][CustomerName]"  class="layui-input" required="" placeholder="商家代码" value="{$config['YTO']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[YTO][MonthCode]"  class="layui-input" required="" placeholder="密钥串" value="{$config['YTO']['MonthCode'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>远成快运(YCWL)</td>
      <td>是(可通过快递鸟后台申请)</td>
      <td>
        <input type="text" name="config[YCWL][CustomerName]"  class="layui-input" required="" placeholder="商户代码" value="{$config['YCWL']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[YCWL][SendSite]"  class="layui-input" required="" placeholder="网点名称" value="{$config['YCWL']['SendSite'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>优速快递(UC)</td>
      <td>是(可通过快递鸟后台申请)</td>
      <td>
        <input type="text" name="config[UC][CustomerName]"  class="layui-input" required="" placeholder="客户编号" value="{$config['UC']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[UC][CustomerPwd]"  class="layui-input" required="" placeholder="密钥(选填)" value="{$config['UC']['CustomerPwd'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>安能快递(ANE)</td>
      <td>是(可通过快递鸟后台申请)</td>
      <td>
        <input type="text" name="config[ANE][CustomerName]"  class="layui-input" required="" placeholder="客户号" value="{$config['ANE']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[ANE][SendSite]"  class="layui-input" required="" placeholder="网点名称(仅数字部分)" value="{$config['ANE']['SendSite'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>全一快递(UAPEX)</td>
      <td>是</td>
      <td>
        <input type="text" name="config[UAPEX][CustomerName]"  class="layui-input" required="" placeholder="客户ID" value="{$config['UAPEX']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[UAPEX][CustomerPwd]"  class="layui-input" required="" placeholder="客户密钥" value="{$config['UAPEX']['CustomerPwd'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>申通快递(STO)</td>
      <td>是</td>
      <td>
        <input type="text" name="config[STO][CustomerName]"  class="layui-input" required="" placeholder="客户简称" value="{$config['STO']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[STO][CustomerPwd]"  class="layui-input" required="" placeholder="客户密码" value="{$config['STO']['CustomerPwd'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[STO][SendSite]"  class="layui-input" required="" placeholder="所属网点" value="{$config['STO']['SendSite'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>德邦快递(DBL)</td>
      <td>是</td>
      <td>
        <input type="text" name="config[DBL][CustomerName]"  class="layui-input" required="" placeholder="月结编码" value="{$config['DBL']['CustomerName'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>京东快递(JD)</td>
      <td>是</td>
      <td>
        <input type="text" name="config[JD][CustomerName]"  class="layui-input" required="" placeholder="商家编码" value="{$config['JD']['CustomerName'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>信丰物流(XFEX)</td>
      <td>是</td>
      <td>
        <input type="text" name="config[XFEX][CustomerName]"  class="layui-input" required="" placeholder="客户平台ID" value="{$config['XFEX']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[XFEX][CustomerPwd]"  class="layui-input" required="" placeholder="客户平台验证码" value="{$config['XFEX']['CustomerPwd'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[XFEX][SendSite]"  class="layui-input" required="" placeholder="客户商号ID或仓库ID" value="{$config['XFEX']['SendSite'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>天天快递(HHTT)</td>
      <td>是</td>
      <td>
        <input type="text" name="config[HHTT][CustomerName]"  class="layui-input" required="" placeholder="客户帐号" value="{$config['HHTT']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[HHTT][CustomerPwd]"  class="layui-input" required="" placeholder="客户密码" value="{$config['HHTT']['CustomerPwd'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[HHTT][SendSite]"  class="layui-input" required="" placeholder="网点名称" value="{$config['HHTT']['SendSite'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>速尔快递(SURE)</td>
      <td>是</td>
      <td>
        <input type="text" name="config[SURE][CustomerName]"  class="layui-input" required="" placeholder="客户号" value="{$config['SURE']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[SURE][SendSite]"  class="layui-input" required="" placeholder="网点编号(仓库号)" value="{$config['SURE']['SendSite'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[SURE][SendStaff]"  class="layui-input" required="" placeholder="收件快递员(网点提供)" value="{$config['SURE']['SendStaff'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>跨越速运(KYSY)</td>
      <td>是</td>
      <td>
        <input type="text" name="config[KYSY][CustomerName]"  class="layui-input" required="" placeholder="客户号" value="{$config['KYSY']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[KYSY][MonthCode]"  class="layui-input" required="" placeholder="付款账号(选填)" value="{$config['KYSY']['MonthCode'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>品骏快递(PJ)</td>
      <td>是</td>
      <td>
        <input type="text" name="config[PJ][CustomerName]"  class="layui-input" required="" placeholder="月结号" value="{$config['PJ']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[PJ][CustomerPwd]"  class="layui-input" required="" placeholder="密钥" value="{$config['PJ']['CustomerPwd'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>承诺达(CND)</td>
      <td>是</td>
      <td>
        <input type="text" name="config[CND][CustomerName]"  class="layui-input" required="" placeholder="客户编码" value="{$config['CND']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[CND][SendSite]"  class="layui-input" required="" placeholder="客户密钥" value="{$config['CND']['SendSite'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>极兔速递(JTSD)</td>
      <td>是</td>
      <td>
        <input type="text" name="config[JTSD][CustomerName]"  class="layui-input" required="" placeholder="客户号" value="{$config['JTSD']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[JTSD][CustomerPwd]"  class="layui-input" required="" placeholder="密码" value="{$config['JTSD']['CustomerPwd'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>丹鸟物流(DNWL)</td>
      <td>是</td>
      <td>
        <input type="text" name="config[DNWL][CustomerName]"  class="layui-input" required="" placeholder="账号" value="{$config['DNWL']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[DNWL][CustomerPwd]"  class="layui-input" required="" placeholder="密码" value="{$config['DNWL']['CustomerPwd'] | default='' }">
      </td>
    </tr>
    <tr>
      <td>苏宁物流(SNWL)</td>
      <td>是</td>
      <td>
        <input type="text" name="config[SNWL][CustomerName]"  class="layui-input" required="" placeholder="账号" value="{$config['SNWL']['CustomerName'] | default='' }">
      </td>
      <td>
        <input type="text" name="config[SNWL][CustomerPwd]"  class="layui-input" required="" placeholder="密码" value="{$config['SNWL']['CustomerPwd'] | default='' }">
      </td>
    </tr>

  </table>


</form>
</div>
</body>

<include file="public/scripts"/>
<script>
  
    var tijiao = function(){

    if($("input[name='edit[EBusinessID]']").val() == ''){
      layer.msg('请输入电商ID');
      return false;
    }
    if($("input[id='edit[AppKey]']").val() == ''){
      layer.msg('请输入电商私钥');
      return false;
    }
    if($("input[id='edit[printName]']").val() == ''){
      layer.msg('未正确输入打印机名称将无法打印面单');
      return false;
    }
    var dara = $("#f").serialize();

    $.ajax({
      url:"{:cmf_plugin_url('logistics://logistics_kdniao/configPage')}",
      data:dara,
      type:'post',
      success:function(data){
        if (data.code == 200) {
          layer.msg(data.message,{icon:1,time:1500},function(){
            parent.layer.closeAll();
            parent.location.reload(); 
          });
        } else {
          layer.msg(data.message,{icon:2,time:1500});
        }
      },
      error:function()
      {
        layer.msg('系统错误',{icon:2,time:1500});
      }
    })
    }
</script>
</html>